
from LicManager.models import Client
from django.conf.urls.defaults import *
import os
import os.path

client_dict = {'queryset':Client.objects.all()}

urlpatterns = patterns('', \
                       (r'''^admin/''', include('django.contrib.admin.urls')), \
                       (r'''^clic/$''', 'django.views.generic.list_detail.object_list', \
                            dict(client_dict, template_name='licmanager_index_list.htm')), \
                       (r'''^clic/(?P<object_id>\d+)/$''', 'django.views.generic.list_detail.object_detail', \
                            dict(client_dict, template_name='licmanager_index_detail.htm')), \
                       (r'''^clic/editregcode/(\d)/(changeregcode/|addregcode/)?''', 'LicManager.views.view_regcode'), \
                       (r'''^clic/editclient/(\d)/(changeclient/|deleteclient/)?''', 'LicManager.views.view_client'), \
                       (r'''^clic/addclient/?''', 'LicManager.views.view_add_client'), \
                       (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join(os.getcwd(), 'LicManager\\media\\')}),
)
